<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>菜单&权限</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
    <link rel="stylesheet" href="/static/weadmin/css/we.css">
</head>
<body class="unibody">
<div class="layui-row">
    <div class="layui-col-md12">
        <blockquote class="layui-elem-quote layui-quote-nm">
            <div class="layui-row">
                <div class="layui-col-md1 layui-col-sm2">
                    <a class="layui-btn layui-btn-normal menu-add"><i class="layui-icon">&#xe608;</i>添加</a>
                </div>
            </div>
        </blockquote>
    </div>
    <hr class="layui-bg-blue">
    <div class="layui-col-md12">
        <table class="layui-table">
            <colgroup>
                <col width="30">
                <col><col><col><col><col>
                <col width="180">
            </colgroup>
            <thead>
                <tr>
                    <th>ID</th>
                    <th>名称</th>
                    <th>节点</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>排序</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {{foreach name="list" item="vo"}}
                    <tr>
                        <td>{{$vo.id}}</td>
                        <td>{{$vo.lefthtml}}</td>
                        <td>{{$vo.href}}</td>
                        <td>{{$vo.is_show}}</td>
                        <td>{{$vo.created_at}}</td>
                        <td content="center">{{$vo.sort}}</td>
                        <td align="center">
                            <a class="layui-btn layui-btn-xs edit" id="{{$vo.id}}">编辑</a>
                            <a class="layui-btn layui-btn-danger layui-btn-xs del" id="{{$vo.id}}">删除</a>
                        </td>
                    </tr>
                {{/foreach}}
            </tbody>
        </table>
    </div>
</div>
<script src="/static/layui/layui.js"></script>
<script src="/static/weadmin/js/admin/menu/menu.js"></script>
</body>
<!-- 添加页 -->
<div class="lay-row menu-from" hidden>
    <hr>
    <div class="layui-col-md11">
        <form class="layui-form" action="">
        <input type="hidden" name="id" value="">
            <div class="layui-form-item">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">节点</label>
                <div class="layui-input-block">
                    <input type="text" name="href" required  lay-verify="required" placeholder="请输入节点" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">父级</label>
                <div class="layui-input-block">
                    <select class="sel" name="parent_id" lay-verify="required">
                        <option value=""></option>
                        {{foreach name="list" item="vo"}}
                            <option value="{{$vo.id}}">{{$vo.lefthtml}}</option>
                        {{/foreach}}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图标</label>
                <div class="layui-input-inline">
                    <input type="text" name="icon" placeholder="请选择图标" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux"><a href="http://fontawesome.dashgame.com/" target="_black">选择图标</a> 如：fa-paper-plane</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="text" name="sort" placeholder="必须为数字" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">辅助文字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="is_show" lay-skin="switch" lay-text="开|关" checked>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formMenu">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <hr>
</div>
<!-- 修改页 -->
<div class="lay-row menu-edit" hidden>
    <hr>
    <div class="layui-col-md11">
        <form class="layui-form" action="">
            <input type="hidden" name="id" id="id-edit" value="">
            <div class="layui-form-item">
                <label class="layui-form-label">名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" id="name-edit" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">节点</label>
                <div class="layui-input-block">
                    <input type="text" name="href" id="href-edit" required  lay-verify="required" placeholder="请输入节点" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">父级</label>
                <div class="layui-input-block">
                    <select class="sel" name="parent_id" id="parent-edit" lay-verify="required">
                        <option value=""></option>
                        {{foreach name="list" item="vo"}}
                        <option value="{{$vo.id}}">{{$vo.lefthtml}}</option>
                        {{/foreach}}
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">图标</label>
                <div class="layui-input-inline">
                    <input type="text" name="icon" id="icon-edit" placeholder="请选择图标" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux"><a href="http://fontawesome.dashgame.com/" target="_black">选择图标</a> 如：fa-paper-plane</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-inline">
                    <input type="text" name="sort" id="sort-edit" placeholder="必须为数字" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">辅助文字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="is_show" lay-skin="switch" lay-text="开|关" checked>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formMenuEdit">立即提交</button>
                </div>
            </div>
        </form>
    </div>
    <hr>
</div>
</html>